#include "board.h"
#include "cm_backtrace.h"
#include "drv_hal_led/drv_hal_led.h"
#include "drv_hal_key/drv_hal_key.h"
#include "motor.h"

#define DBG_TAG           "main"
//#define DBG_LVL           DBG_INFO
#define DBG_LVL           DBG_LOG
//#define DBG_LVL           DBG_NODBG
#include <mydbg.h>          // must after of DBG_LVL, DBG_TAG or other options

#define HARDWARE_VERSION               "V1.0.0"

int hardware_init(void)
{
#ifdef BOARD_CONFIG_USING_CMBACKTRACE
  cm_backtrace_init("CmBacktrace", HARDWARE_VERSION, CMB_SW_VERSION);
#endif
  led_pin_init();
  key_pin_init();
  Motor_Init();
  return 0;
}

int main(void)
{
  rt_base_t level;
  hardware_init();
  int value = 0;
  while(1){
    rt_thread_mdelay(100);
    
  }
  return 0;
}
